<template>
  <div class="data_brain_wrap">
    <div class="brain_title">爱西玺</div>
    <div class="brain_desc">YOU ARE THE STYLE</div>

    <el-row class="card_wrap" type="flex">
      <el-col
        class="brain_item"
        :lg="5"
        :sm="11"
        :xs="20"
        v-for="(item, index) in cardList"
        :key="index"
        style="margin-bottom: 20px"
      >
        <div
          style="width: 100%; height: 100%"
          @click="handleNavigate(index + 1)"
        >
          <div class="item_title">{{ item.title }}</div>
          <el-image :src="item.img" lazy style="width: 100%" />
          <div class="item_navigate">点击了解详情 >></div>
          <div class="item_bg"></div>
        </div>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  data() {
    return {
      cardList: [
        {
          title: "月兔系列",
          desc: "",
          img: require("@/assets/asissi/pro/YueTu/1.jpg"),
        },
        {
          title: "蝴蝶系列",
          desc: "",
          img: require("@/assets/asissi/pro/HuDie/1.jpg"),
        },
        {
          title: "吉祥结系列",
          desc: "",
          img: require("@/assets/asissi/pro/JiXiangJie/1.jpg"),
        },
        {
          title: "蕉叶系列",
          desc: "",
          img: require("@/assets/asissi/pro/JiaoYe/1.jpg"),
        },
        // {
        //   title: "智能招商云平台",
        //   desc: "",
        // },
        // {
        //   title: "企业服务",
        //   desc: "",
        // },
      ],
    };
  },
  methods: {
    handleNavigate(index) {
      console.log(index);
      this.$router.push(`/production/${index}`).catch((v) => {});
    },
  },
};
</script>

<style lang="scss" scoped>
.data_brain_wrap {
  padding: 50px 0;
  background: #e8eef2;
  text-align: center;
  .brain_title {
    color: #203040;
    font-size: 40px;
    font-weight: bold;
    padding: 30px 0;
    @media screen and (max-width: 768px) {
      font-size: 1.5rem;
    }
  }
  .brain_desc {
    color: rgba(32, 48, 64, 0.75);
    font-size: 22px;
    letter-spacing: 4px;
    @media screen and (max-width: 768px) {
      font-size: 0.8rem;
      line-height: 40px;
    }
  }
  .card_wrap {
    width: 70%;
    flex-wrap: wrap;
    margin: 0px auto;
    justify-content: space-around;
    @media screen and (max-width: 768px) {
      width: 95%;
    }
    .brain_item {
      transition: background-color 1s;
      padding: 30px;
      @media screen and (max-width: 768px) {
        font-size: 0.8rem;
        line-height: 40px;
        border-radius: 10px;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 20px;
        &:nth-child(-n + 2) {
          margin-top: 0;
        }
      }
      background: #fff;
      border-radius: 20px;
      box-shadow: 0 0.5rem 1.5rem 0 rgba(0, 135, 168, 0.15);
      margin-top: 40px;
      position: relative;
      .item_bg {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        // background: linear-gradient(
        //   134deg,
        //   #cdcdcd 1%,
        //   #f0f0f0 41%,
        //   #ffffff 99%
        // );
        background: white;
        opacity: 0;
        transition: all 0.5s;
        border-radius: 20px;
        z-index: 1;
      }
      &:hover .item_bg {
        // opacity: 1;
      }
      &:hover .item_title {
        // color: #fff;
        font-size: 1.2rem;
      }
      &:hover .item_desc {
        // color: #fff;
      }
      .item_title {
        transition: all 0.5s;
        font-size: 30px;
        font-weight: bold;
        color: #203040;
        text-align: left;
        padding: 20px 0 40px 0;
        z-index: 2;
        position: inherit;
        @media screen and (max-width: 768px) {
          font-size: 1rem;
          text-align: center;
        }
      }
      .item_desc {
        transition: all 0.5s;
        color: #666;
        text-align: left;
        line-height: 1.5rem;
        z-index: 2;
        position: inherit;
        font-size: 18px;
        min-height: 110px;
        @media screen and (max-width: 768px) {
          min-height: 110px;
          text-indent: 2em;
          font-size: 12px;
        }
      }
      .item_navigate {
        width: 160px;
        height: 30px;
        padding: 0 10px;
        background: #ffa400;
        color: #fff;
        border-radius: 20px;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 14px;
        margin-top: 40px;
        cursor: pointer;
        z-index: 2;
        position: inherit;
        @media screen and (max-width: 768px) {
          margin-bottom: 10px;
          font-size: 14px;
          margin: 0px auto;
          width: 80%;
          height: 30px;
          border-radius: 20px;
        }
      }
    }
  }
}
</style>
